package com.test.util;

import cn.hutool.core.io.FileUtil;
import cn.hutool.core.io.file.FileWriter;
import cn.hutool.core.util.StrUtil;
import cn.hutool.poi.excel.ExcelReader;
import cn.hutool.poi.excel.ExcelUtil;
import cn.hutool.poi.excel.ExcelWriter;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class RecordExcelUtil {

    private static final String path = "C:\\Users\\41636\\Downloads\\Result_10.xlsx";


    public static void main(String[] args) {
        ExcelReader reader = ExcelUtil.getReader(path);
        List<String> phone = new ArrayList<>();
        List<Map<String, Object>> readAll = reader.readAll();
        for (Map<String, Object> stringObjectMap : readAll) {
            String mobileNo = (String)stringObjectMap.get("mobile_no");
            phone.add(mobileNo);
        }
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append("(");
        for (String s : phone) {
            stringBuilder.append("\"").append(s).append("\"").append(",");
        }
        stringBuilder.append(")");
        System.out.println(stringBuilder.toString());
    }
}
